如果您使用的是linux / unix平台,则可以使用nice来降低进程的优先级.
这只有在最大化的cpu时才有用.例如,如果您正在等待磁盘/交换I / O,那么真的无济于事.
NICE(1) User Commands NICE(1)
NAME
nice - run a program with modified scheduling priority
SYNOPSIS
nice [OPTION] [COMMAND [ARG]...]
DESCRIPTION
Run COMMAND with an adjusted niceness, which affects process schedul‐
ing. With no COMMAND, print the current niceness. Nicenesses range
from -20 (most favorable scheduling) to 19 (least favorable).